/**
 * @Project Name:blog-admin-api
 * @Package Name:cn.hoofungson.blog.admin.api.client.article
 * @Since JDK 1.8
 */

package cn.hoofungson.blog.admin.api.client.article;

import cn.hoofungson.blog.admin.api.fallback.article.ArticleFeignClientFallback;
import cn.hoofungson.blog.business.service.interfaces.domain.dto.article.ArticleDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Description: ArticleFeignClient
 * @Author 胡松 hoofungson@163.com
 * @Date 2020-03-24 20:52
 * @Version V1.0
 */
@FeignClient(value = "blog-business-service", fallback = ArticleFeignClientFallback.class)
public interface ArticleFeignClient {

    @GetMapping("/service/article")
    ResponseEntity<ArticleDTO> get();

    @GetMapping("/service/article/{id}")
    ResponseEntity<ArticleDTO> get(@PathVariable("id") Long id);
}
